package com.wxtl.entity;

import javax.persistence.Column;
import javax.persistence.Embeddable;

/**
 * LkAgentProductId entity. @author MyEclipse Persistence Tools
 */
@Embeddable
public class LkAgentProductId implements java.io.Serializable {

	// Fields

	private Integer agentId;
	private Integer productId;

	// Constructors

	/** default constructor */
	public LkAgentProductId() {
	}

	/** full constructor */
	public LkAgentProductId(Integer agentId, Integer productId) {
		this.agentId = agentId;
		this.productId = productId;
	}

	// Property accessors

	@Column(name = "agentId", nullable = false)
	public Integer getAgentId() {
		return this.agentId;
	}

	public void setAgentId(Integer agentId) {
		this.agentId = agentId;
	}

	@Column(name = "productId", nullable = false)
	public Integer getProductId() {
		return this.productId;
	}

	public void setProductId(Integer productId) {
		this.productId = productId;
	}

	public boolean equals(Object other) {
		if ((this == other))
			return true;
		if ((other == null))
			return false;
		if (!(other instanceof LkAgentProductId))
			return false;
		LkAgentProductId castOther = (LkAgentProductId) other;

		return ((this.getAgentId() == castOther.getAgentId()) || (this
				.getAgentId() != null && castOther.getAgentId() != null && this
				.getAgentId().equals(castOther.getAgentId())))
				&& ((this.getProductId() == castOther.getProductId()) || (this
						.getProductId() != null
						&& castOther.getProductId() != null && this
						.getProductId().equals(castOther.getProductId())));
	}

	public int hashCode() {
		int result = 17;

		result = 37 * result
				+ (getAgentId() == null ? 0 : this.getAgentId().hashCode());
		result = 37 * result
				+ (getProductId() == null ? 0 : this.getProductId().hashCode());
		return result;
	}

}